﻿using Gp.Scripts.Data.Skills;
using UnityEngine;

namespace Gp.Scripts.Data {
    // 由技能信息提供Data的buff
    public class SkillBuff : BaseBuff {
        private BuffEntityConfig _buffEntityConfig;
        protected SkillEntityConfig SkillEntityConfig;
        public override BuffEntityConfig EntityConfig => _buffEntityConfig;

        public virtual int DisplayLevel => 1;

        public SkillBuff(SkillEntityConfig config) {
            // var instance = ScriptableObject.CreateInstance<DefaultBuffConfig>();
            // instance.Init();
            // IConfig.CopyConfig(config, instance);
            // _buffConfig = instance;
            // SkillConfig = config;
        }

        protected override void Init() { }


        public override BuffIconRenderInfo OnIconRender() {
            var info = base.OnIconRender();
            if (DisplayLevel > 1) info.BuffName += " lv." + DisplayLevel;
            return info;
        }
    }
}